<%@page contentType="text/html" pageEncoding="ISO-8859-1"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>
<html>
    <head>
        <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
        <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
        <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
   
        
        <script>
            $(document).ready(function() {  
                $("#campofecha").datepicker({
                    showOn: 'both',
                    buttonImage: 'images/calendar.gif',
                    buttonImageOnly: true,
                    changeMonth: true,
                    changeYear: true,
                    numberOfMonths: 1
                    /*onSelect: function(textoFecha, objDatepicker){
                    $("#mensaje").html("<p>Has seleccionado: " + textoFecha + "</p>");
                    }*/
                });
            })
            
	$(function() {
		$( "#datepicker" ).datepicker();
	});
	/*for (i=0;i<document.frmArea.rbSele.length;i++){
                    if (document.frmArea.rbSele[i].checked==true)
                     Codigo=document.frmArea.rbSele[i].value;
                }*/
        //alert(item);
            //var carrera = document.getElementById("cboDemo"+item);               
            //alert(carrera.options[carrera.selectedIndex].value);
            
            /*/if(select.options.length > 0) {
                    window.alert("Text: " + 
                            select.options[select.selectedIndex].text + "\nValue: " + 
                                    select.options[select.selectedIndex].value);
            }else {
                    window.alert("Select box is empty");
            }*/
        function demo(item){
           
         if(document.frmArea.cboDemo.length==undefined){
                alert(document.frmArea.cboDemo.options[document.frmArea.cboDemo.selectedIndex].value);
            }else{
                alert(document.frmArea.cboDemo[item].options[document.frmArea.cboDemo[item].selectedIndex].value);                
            }           
        }
         </script>
    </head>
    <body >
    Fecha: <input type="text" name="campofecha" id="campofecha"><br/>
    Fecha: <input type="text" name="datepicker" id="datepicker">
        
    <form action="form" method="POST" name="frmArea" id="frmArea">
    <select name="cboDemo" id="cboDemo">
        <option value="1">1</option>
        <option value="2">2</option>
        </select>
        <input type="button" value="1" onclick="demo(0);" />
        <select name="cboDemo" id="cboDemo">
        <option value="3">3</option>
        <option value="4">4</option>
        </select>
        <input type="button" value="2" onclick="demo(1);"/>
    </form>
</html>

